aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/mass test client/Commands/GotoLandmark.cs
blob: d32047c6ff5fad9063316e55c590efd1f7f77ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;

namespace libsecondlife.TestClient
{
    public class GotoLandmarkCommand : Command
    {
		public GotoLandmarkCommand(TestClient testClient)
        {
            Name = "goto_landmark";
            Description = "Teleports to a Landmark ";
        }

        public override string Execute(string[] args, LLUUID fromAgentID)
        {
			LLUUID landmark = new LLUUID();
			if ( ! LLUUID.TryParse(args[0], out landmark) ) {
				return "Invalid LLUID";
			} else {
				Console.WriteLine("Teleporting to " + landmark.ToString());
			}
			if ( Client.Self.Teleport(landmark) ) {
				return "Teleport Succesful";
			} else {
				return "Teleport Failed";
			}
        }
    }
}